/*Define require configuration paths*/
requirejs.config({
    "paths"	: {
		"core"	: 	"../boilerplate/core",
		"lib"	: 	"../boilerplate/lib",
		"misc"	: 	"../boilerplate/misc",
		"conf"	: 	"../conf"
    }
});
/*Main page*/
require(['core/boilerplate', 'game'], function (Boilerplate, Game) {

	/* This code prevents users from dragging the page */
	var preventDefaultScroll = function(event) {
	    event.preventDefault();
	    window.scroll(0,0);
	    return false;
	};
	document.addEventListener('touchmove', preventDefaultScroll, false);

	/* This code is used to run as soon as appMobi activates */
	var onDeviceReady=function(){
		alert('onDeviceReady');

		// Initialize boilerplate
		Boilerplate.init(Game);

		// Set display
		Boilerplate.scene.setViewPort();
	};
	document.addEventListener("appMobi.device.ready",onDeviceReady,false);
});